<?php
/**
 demo control
 */
class demo extends control
{
    /* 构造函数。*/
    public function __construct()
    {
        parent::__construct();
    }

    /* index方法，也是默认的方法。*/
    public function index()
    {
    	echo '---';var_dump($_REQUEST);
        $header['title'] = 'demo首页演示';
        $this->assign('header',  $header);
//        $this->assign('content', $this->lang->content);

		$data = '';
		$page = helper::createPage();
		
		$data = $this->demo->findPage($page, null, '*');
		$this->assign('data', $data);
        $this->assign('content', 'xxxyz');
        $this->display();
    }
    
    public function get(){
    	var_dump($_REQUEST);
    	die();
    	$params = helper::filterParams();
    	$id = (int)$params['id'];
    	$data = '';
    	echo '-----' . $_REQUEST['id'];
    	if($id){
    		$data = $this->demo->get($id);
    	}
    	$this->assign('data', $data);
    	$this->display();
    }
}
